﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.CompilerServices;
using AutoR.Models;
using AutoR.Services;
using AutoR.Tasks;
using Prism.Commands;
using Prism.Mvvm;
using Prism.Navigation;
using Prism.Services;

namespace AutoR.ViewModels.Home
{
	// Token: 0x020000BC RID: 188
	public class MainViewModel : BindableBase, INavigationAware, INavigatedAware, INavigatingAware
	{
		// Token: 0x170000FD RID: 253
		// (get) Token: 0x060003AB RID: 939 RVA: 0x0004A5CA File Offset: 0x000487CA
		private INavigationService NavigationService { get; }

		// Token: 0x170000FE RID: 254
		// (get) Token: 0x060003AC RID: 940 RVA: 0x0004A5D2 File Offset: 0x000487D2
		private IPageDialogService PageDialogService { get; }

		// Token: 0x170000FF RID: 255
		// (get) Token: 0x060003AD RID: 941 RVA: 0x000408F6 File Offset: 0x0003EAF6
		public GameData Game
		{
			get
			{
				return Runtime.Game;
			}
		}

		// Token: 0x17000100 RID: 256
		// (get) Token: 0x060003AE RID: 942 RVA: 0x0004A5DA File Offset: 0x000487DA
		// (set) Token: 0x060003AF RID: 943 RVA: 0x0004A5E4 File Offset: 0x000487E4
		public string ShipImage
		{
			[CompilerGenerated]
			get
			{
				return this.<ShipImage>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<ShipImage>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<ShipImage>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ShipImage);
			}
		}

		// Token: 0x17000101 RID: 257
		// (get) Token: 0x060003B0 RID: 944 RVA: 0x0004A615 File Offset: 0x00048815
		// (set) Token: 0x060003B1 RID: 945 RVA: 0x0004A620 File Offset: 0x00048820
		public string ShipName
		{
			[CompilerGenerated]
			get
			{
				return this.<ShipName>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<ShipName>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<ShipName>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.ShipName);
			}
		}

		// Token: 0x17000102 RID: 258
		// (get) Token: 0x060003B2 RID: 946 RVA: 0x0004A651 File Offset: 0x00048851
		// (set) Token: 0x060003B3 RID: 947 RVA: 0x0004A65C File Offset: 0x0004885C
		public string Dialogue
		{
			[CompilerGenerated]
			get
			{
				return this.<Dialogue>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (string.Equals(this.<Dialogue>k__BackingField, value, StringComparison.Ordinal))
				{
					return;
				}
				this.<Dialogue>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Dialogue);
			}
		}

		// Token: 0x17000103 RID: 259
		// (get) Token: 0x060003B4 RID: 948 RVA: 0x0004A68D File Offset: 0x0004888D
		public DelegateCommand RebootCommand { get; }

		// Token: 0x17000104 RID: 260
		// (get) Token: 0x060003B5 RID: 949 RVA: 0x0004A695 File Offset: 0x00048895
		public DelegateCommand StartCommand { get; }

		// Token: 0x17000105 RID: 261
		// (get) Token: 0x060003B6 RID: 950 RVA: 0x0004A69D File Offset: 0x0004889D
		public DelegateCommand StopCommand { get; }

		// Token: 0x17000106 RID: 262
		// (get) Token: 0x060003B7 RID: 951 RVA: 0x0004A6A5 File Offset: 0x000488A5
		public DelegateCommand CloseCommand { get; }

		// Token: 0x17000107 RID: 263
		// (get) Token: 0x060003B8 RID: 952 RVA: 0x0004A6AD File Offset: 0x000488AD
		public DelegateCommand ClearCommand { get; }

		// Token: 0x17000108 RID: 264
		// (get) Token: 0x060003B9 RID: 953 RVA: 0x0004A6B5 File Offset: 0x000488B5
		public DelegateCommand<UserShip> ChangeShipCommand { get; }

		// Token: 0x17000109 RID: 265
		// (get) Token: 0x060003BA RID: 954 RVA: 0x0004A6BD File Offset: 0x000488BD
		public DelegateCommand<UserFleet> AddShipCommand { get; }

		// Token: 0x1700010A RID: 266
		// (get) Token: 0x060003BB RID: 955 RVA: 0x0004A6C5 File Offset: 0x000488C5
		public DelegateCommand<RepairDockInfo> InstantRepairCommand { get; }

		// Token: 0x1700010B RID: 267
		// (get) Token: 0x060003BC RID: 956 RVA: 0x0004A6CD File Offset: 0x000488CD
		public DelegateCommand<AttackTask> AttackTaskCommand { get; }

		// Token: 0x1700010C RID: 268
		// (get) Token: 0x060003BD RID: 957 RVA: 0x0004A6D5 File Offset: 0x000488D5
		public DelegateCommand AddAttackTaskCommand { get; }

		// Token: 0x1700010D RID: 269
		// (get) Token: 0x060003BE RID: 958 RVA: 0x0004A6DD File Offset: 0x000488DD
		public DelegateCommand BackupCommand { get; }

		// Token: 0x1700010E RID: 270
		// (get) Token: 0x060003BF RID: 959 RVA: 0x0004A6E5 File Offset: 0x000488E5
		public DelegateCommand DownloadCommand { get; }

		// Token: 0x1700010F RID: 271
		// (get) Token: 0x060003C0 RID: 960 RVA: 0x0004A6ED File Offset: 0x000488ED
		public DelegateCommand ShipDialogueCommand { get; }

		// Token: 0x17000110 RID: 272
		// (get) Token: 0x060003C1 RID: 961 RVA: 0x0004A6F5 File Offset: 0x000488F5
		public DelegateCommand ShipStatCommand { get; }

		// Token: 0x17000111 RID: 273
		// (get) Token: 0x060003C2 RID: 962 RVA: 0x0004A6FD File Offset: 0x000488FD
		public DelegateCommand FleetInfoCommand { get; }

		// Token: 0x17000112 RID: 274
		// (get) Token: 0x060003C3 RID: 963 RVA: 0x0004A705 File Offset: 0x00048905
		public DelegateCommand UserInfoCommand { get; }

		// Token: 0x17000113 RID: 275
		// (get) Token: 0x060003C4 RID: 964 RVA: 0x0004A70D File Offset: 0x0004890D
		public DelegateCommand HiddenResShow { get; }

		// Token: 0x17000114 RID: 276
		// (get) Token: 0x060003C5 RID: 965 RVA: 0x0004A715 File Offset: 0x00048915
		// (set) Token: 0x060003C6 RID: 966 RVA: 0x0004A720 File Offset: 0x00048920
		public bool FleetInfo
		{
			[CompilerGenerated]
			get
			{
				return this.<FleetInfo>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<FleetInfo>k__BackingField == value)
				{
					return;
				}
				this.<FleetInfo>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.FleetInfo);
			}
		}

		// Token: 0x17000115 RID: 277
		// (get) Token: 0x060003C7 RID: 967 RVA: 0x0004A74D File Offset: 0x0004894D
		// (set) Token: 0x060003C8 RID: 968 RVA: 0x0004A758 File Offset: 0x00048958
		public bool Stat
		{
			[CompilerGenerated]
			get
			{
				return this.<Stat>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<Stat>k__BackingField == value)
				{
					return;
				}
				this.<Stat>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.StatB);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Stat);
			}
		}

		// Token: 0x17000116 RID: 278
		// (get) Token: 0x060003C9 RID: 969 RVA: 0x0004A790 File Offset: 0x00048990
		public bool StatB
		{
			get
			{
				return !this.Stat;
			}
		}

		// Token: 0x17000117 RID: 279
		// (get) Token: 0x060003CA RID: 970 RVA: 0x0004A79B File Offset: 0x0004899B
		// (set) Token: 0x060003CB RID: 971 RVA: 0x0004A7A4 File Offset: 0x000489A4
		public bool IsResShow
		{
			[CompilerGenerated]
			get
			{
				return this.<IsResShow>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<IsResShow>k__BackingField == value)
				{
					return;
				}
				this.<IsResShow>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsResShow);
			}
		}

		// Token: 0x17000118 RID: 280
		// (get) Token: 0x060003CC RID: 972 RVA: 0x0004A7D1 File Offset: 0x000489D1
		public DelegateCommand MusicStartCommand { get; }

		// Token: 0x17000119 RID: 281
		// (get) Token: 0x060003CD RID: 973 RVA: 0x0004A7D9 File Offset: 0x000489D9
		public DelegateCommand MusicStopCommand { get; }

		// Token: 0x1700011A RID: 282
		// (get) Token: 0x060003CE RID: 974 RVA: 0x0004A7E1 File Offset: 0x000489E1
		public DelegateCommand VolCommand { get; }

		// Token: 0x1700011B RID: 283
		// (get) Token: 0x060003CF RID: 975 RVA: 0x0004A7E9 File Offset: 0x000489E9
		public DelegateCommand VolMuteCommand { get; }

		// Token: 0x1700011C RID: 284
		// (get) Token: 0x060003D0 RID: 976 RVA: 0x0004A7F1 File Offset: 0x000489F1
		public DelegateCommand StatClearCommand { get; }

		// Token: 0x1700011D RID: 285
		// (get) Token: 0x060003D1 RID: 977 RVA: 0x0004A7F9 File Offset: 0x000489F9
		public DelegateCommand<DockInfo> InstantBuildCommand { get; }

		// Token: 0x1700011E RID: 286
		// (get) Token: 0x060003D2 RID: 978 RVA: 0x0004A801 File Offset: 0x00048A01
		public DelegateCommand<EquipmentDockInfo> InstantEquipmentCommand { get; }

		// Token: 0x060003D3 RID: 979 RVA: 0x0004A80C File Offset: 0x00048A0C
		public MainViewModel(INavigationService navigationService, IPageDialogService pageDialogService)
		{
			this.<FleetInfo>k__BackingField = true;
			MainViewModel.<>c__DisplayClass106_0 CS$<>8__locals1 = new MainViewModel.<>c__DisplayClass106_0();
			CS$<>8__locals1.pageDialogService = pageDialogService;
			base..ctor();
			CS$<>8__locals1.<>4__this = this;
			this.NavigationService = navigationService;
			this.PageDialogService = CS$<>8__locals1.pageDialogService;
			this.RebootCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__0>d <<-ctor>b__0>d;
				<<-ctor>b__0>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__0>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__0>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__0>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__0>d>(ref <<-ctor>b__0>d);
			});
			this.StartCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__1>d <<-ctor>b__1>d;
				<<-ctor>b__1>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__1>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__1>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__1>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__1>d>(ref <<-ctor>b__1>d);
			});
			this.StopCommand = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.Game.StopService();
			});
			this.CloseCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__3>d <<-ctor>b__3>d;
				<<-ctor>b__3>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__3>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__3>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__3>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__3>d>(ref <<-ctor>b__3>d);
			});
			this.StatClearCommand = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.Game.Statistics = new Statistics();
			});
			this.ClearCommand = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.Game.MainLog = "";
			});
			this.ShipStatCommand = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.Stat = !CS$<>8__locals1.<>4__this.Stat;
			});
			this.HiddenResShow = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.IsResShow = !CS$<>8__locals1.<>4__this.IsResShow;
			});
			this.FleetInfoCommand = new DelegateCommand(delegate()
			{
				CS$<>8__locals1.<>4__this.FleetInfo = !CS$<>8__locals1.<>4__this.FleetInfo;
			});
			this.InstantRepairCommand = new DelegateCommand<RepairDockInfo>(new Action<RepairDockInfo>(this.OnInstantRepairCommandExecuted));
			this.AttackTaskCommand = new DelegateCommand<AttackTask>(delegate(AttackTask arg)
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__9>d <<-ctor>b__9>d;
				<<-ctor>b__9>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__9>d.arg = arg;
				<<-ctor>b__9>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__9>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__9>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__9>d>(ref <<-ctor>b__9>d);
			});
			this.AddAttackTaskCommand = new DelegateCommand(new Action(this.OnAddAttackTaskCommandExecuted));
			this.ShipDialogueCommand = new DelegateCommand(new Action(this.OnShipExecuted));
			this.BackupCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__10>d <<-ctor>b__10>d;
				<<-ctor>b__10>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__10>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__10>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__10>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__10>d>(ref <<-ctor>b__10>d);
			});
			this.DownloadCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__11>d <<-ctor>b__11>d;
				<<-ctor>b__11>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__11>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__11>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__11>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__11>d>(ref <<-ctor>b__11>d);
			});
			this.ChangeShipCommand = new DelegateCommand<UserShip>(delegate(UserShip s)
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__12>d <<-ctor>b__12>d;
				<<-ctor>b__12>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__12>d.s = s;
				<<-ctor>b__12>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__12>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__12>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__12>d>(ref <<-ctor>b__12>d);
			});
			this.AddShipCommand = new DelegateCommand<UserFleet>(delegate(UserFleet s)
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__13>d <<-ctor>b__13>d;
				<<-ctor>b__13>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__13>d.s = s;
				<<-ctor>b__13>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__13>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__13>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__13>d>(ref <<-ctor>b__13>d);
			});
			this.UserInfoCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__14>d <<-ctor>b__14>d;
				<<-ctor>b__14>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__14>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__14>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__14>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__14>d>(ref <<-ctor>b__14>d);
			});
			this.InstantBuildCommand = new DelegateCommand<DockInfo>(new Action<DockInfo>(this.OnInstantBuildCommandExecuted));
			this.InstantEquipmentCommand = new DelegateCommand<EquipmentDockInfo>(new Action<EquipmentDockInfo>(this.OnInstantEquipmentCommandExecuted));
			this.MusicStartCommand = new DelegateCommand(delegate()
			{
				MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__15>d <<-ctor>b__15>d;
				<<-ctor>b__15>d.<>4__this = CS$<>8__locals1;
				<<-ctor>b__15>d.<>t__builder = AsyncVoidMethodBuilder.Create();
				<<-ctor>b__15>d.<>1__state = -1;
				AsyncVoidMethodBuilder <>t__builder = <<-ctor>b__15>d.<>t__builder;
				<>t__builder.Start<MainViewModel.<>c__DisplayClass106_0.<<-ctor>b__15>d>(ref <<-ctor>b__15>d);
			});
			this.MusicStopCommand = new DelegateCommand(delegate()
			{
				Runtime.AudioManager.StopBackgroundMusic();
				CS$<>8__locals1.<>4__this.Game.MusicStart = false;
			});
			this.VolCommand = new DelegateCommand(delegate()
			{
				Runtime.AudioManager.BackgroundMusicVolume = 0f;
				CS$<>8__locals1.<>4__this.Game.Vol = true;
			});
			this.VolMuteCommand = new DelegateCommand(delegate()
			{
				Runtime.AudioManager.BackgroundMusicVolume = 0.5f;
				CS$<>8__locals1.<>4__this.Game.Vol = false;
			});
			this.OnShipExecuted();
		}

		// Token: 0x060003D4 RID: 980 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatedFrom(INavigationParameters parameters)
		{
		}

		// Token: 0x060003D5 RID: 981 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatedTo(INavigationParameters parameters)
		{
		}

		// Token: 0x060003D6 RID: 982 RVA: 0x0004067F File Offset: 0x0003E87F
		public void OnNavigatingTo(INavigationParameters parameters)
		{
		}

		// Token: 0x060003D7 RID: 983 RVA: 0x0004AA7C File Offset: 0x00048C7C
		private void OnShipExecuted()
		{
			ShipConfig shipConfig = Runtime.Configs.shipCard.ElementAt(new Random().Next(0, Runtime.Configs.shipCard.Count - 1));
			this.ShipImage = shipConfig.SmallImage;
			this.ShipName = shipConfig.title;
			List<string> list = (from i in shipConfig.mainDialogue
			where i != ""
			select i).ToList<string>();
			this.Dialogue = (list.Any<string>() ? list.ElementAt(new Random().Next(0, list.Count - 1)) : "");
		}

		// Token: 0x060003D8 RID: 984 RVA: 0x0004AB2C File Offset: 0x00048D2C
		private async void OnInstantBuildCommandExecuted(DockInfo item)
		{
			if (!item.IsEmpty)
			{
				TaskAwaiter<bool> taskAwaiter = this.PageDialogService.DisplayAlertAsync("AutoR", string.Format("是否快建{0}？", item.id), "是", "否").GetAwaiter();
				if (!taskAwaiter.IsCompleted)
				{
					await taskAwaiter;
					TaskAwaiter<bool> taskAwaiter2;
					taskAwaiter = taskAwaiter2;
					taskAwaiter2 = default(TaskAwaiter<bool>);
				}
				if (taskAwaiter.GetResult() && !this.Game.DelayTask.QuickBuildQueue.Contains(item.id))
				{
					this.Game.DelayTask.QuickBuildQueue.Enqueue(item.id);
				}
			}
		}

		// Token: 0x060003D9 RID: 985 RVA: 0x0004AB70 File Offset: 0x00048D70
		private async void OnInstantEquipmentCommandExecuted(EquipmentDockInfo item)
		{
			if (!item.IsEmpty)
			{
				TaskAwaiter<bool> taskAwaiter = this.PageDialogService.DisplayAlertAsync("AutoR", string.Format("是否快建{0}？", item.id), "是", "否").GetAwaiter();
				if (!taskAwaiter.IsCompleted)
				{
					await taskAwaiter;
					TaskAwaiter<bool> taskAwaiter2;
					taskAwaiter = taskAwaiter2;
					taskAwaiter2 = default(TaskAwaiter<bool>);
				}
				if (taskAwaiter.GetResult() && !this.Game.DelayTask.QuickEquipmentQueue.Contains(item.id))
				{
					this.Game.DelayTask.QuickEquipmentQueue.Enqueue(item.id);
				}
			}
		}

		// Token: 0x060003DA RID: 986 RVA: 0x0004ABB4 File Offset: 0x00048DB4
		private async void OnInstantRepairCommandExecuted(RepairDockInfo item)
		{
			if (!item.IsEmpty)
			{
				TaskAwaiter<bool> taskAwaiter = this.PageDialogService.DisplayAlertAsync("AutoR", "是否快修" + item.Name + "？", "是", "否").GetAwaiter();
				if (!taskAwaiter.IsCompleted)
				{
					await taskAwaiter;
					TaskAwaiter<bool> taskAwaiter2;
					taskAwaiter = taskAwaiter2;
					taskAwaiter2 = default(TaskAwaiter<bool>);
				}
				if (taskAwaiter.GetResult() && !this.Game.DelayTask.QuickRepairQueue.Contains(Runtime.Game.RepairDock.IndexOf(item) + 1))
				{
					this.Game.DelayTask.QuickRepairQueue.Enqueue(Runtime.Game.RepairDock.IndexOf(item) + 1);
				}
			}
		}

		// Token: 0x060003DB RID: 987 RVA: 0x0004ABF8 File Offset: 0x00048DF8
		private async void OnAddAttackTaskCommandExecuted()
		{
			string text = await this.PageDialogService.DisplayActionSheetAsync("添加任务", "取消", "自定义任务", new string[]
			{
				"2-1胖次",
				"6-1炸鱼",
				"6-1六鱼",
				"2-2偷油",
				"3-1偷弹",
				"4-3偷铝",
				"5-5六鱼",
				"捞U47",
				"2-5中路",
				"2-5上路",
				"2-5下路",
				"6-3周常",
				"7-4六鱼"
			});
			uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
			if (num <= 2312903235u)
			{
				if (num <= 889841186u)
				{
					if (num != 129605798u)
					{
						if (num != 329095814u)
						{
							if (num == 889841186u)
							{
								if (text == "2-1胖次")
								{
									AttackTask attackTask = new AttackTask();
									attackTask.Name = "2-1胖次";
									attackTask.NodeID = 201;
									attackTask.FleetID = 3;
									attackTask.Number = 50;
									attackTask.RepairStrategy = 0;
									attackTask.AttackNode.Add(new AttackNode
									{
										Node = "B",
										Formation = 0
									});
									attackTask.AttackNode.Add(new AttackNode
									{
										Node = "D",
										Formation = 0
									});
									attackTask.AttackNode.Add(new AttackNode
									{
										Node = "F",
										Formation = 1,
										IsNightWar = true,
										NodeCondition = new ObservableCollection<NodeCondition>
										{
											new NodeCondition
											{
												ShipType = 15,
												Number = 1,
												Operator = 2
											}
										}
									});
									attackTask.RuleFleet.Add(new RuleFleet
									{
										Type = 1,
										Number = 2,
										MinLv = 80,
										MaxLv = 109,
										ShipType = new ObservableCollection<ShipType>
										{
											ShipType.Destroyer
										}
									});
									attackTask.RuleFleet.Add(new RuleFleet
									{
										Type = 1,
										Number = 2,
										MinLv = 80,
										MaxLv = 109,
										ShipType = new ObservableCollection<ShipType>
										{
											ShipType.Carrier,
											ShipType.SeaplaneTender
										}
									});
									this.Game.AttackTasks.Add(attackTask);
								}
							}
						}
						else if (text == "2-2偷油")
						{
							AttackTask attackTask2 = new AttackTask();
							attackTask2.Name = "2-2偷油";
							attackTask2.NodeID = 202;
							attackTask2.FleetID = 3;
							attackTask2.Number = 100;
							attackTask2.RepairStrategy = 0;
							attackTask2.AttackNode.Add(new AttackNode
							{
								Node = "A",
								Formation = 0
							});
							attackTask2.AttackNode.Add(new AttackNode
							{
								Node = "C",
								Formation = 0
							});
							this.Game.AttackTasks.Add(attackTask2);
						}
					}
					else if (text == "6-1六鱼")
					{
						AttackTask attackTask3 = new AttackTask();
						attackTask3.Name = "6-1六鱼";
						attackTask3.NodeID = 601;
						attackTask3.FleetID = 2;
						attackTask3.Number = 100;
						attackTask3.RepairStrategy = 0;
						attackTask3.AttackNode.Add(new AttackNode
						{
							Node = "A",
							Formation = 1,
							IsFound = true
						});
						this.Game.AttackTasks.Add(attackTask3);
					}
				}
				else if (num <= 1357195939u)
				{
					if (num != 1285086576u)
					{
						if (num == 1357195939u)
						{
							if (text == "6-1炸鱼")
							{
								AttackTask attackTask4 = new AttackTask();
								attackTask4.Name = "6-1炸鱼";
								attackTask4.NodeID = 601;
								attackTask4.FleetID = 2;
								attackTask4.Number = 100;
								attackTask4.RepairStrategy = 0;
								attackTask4.AttackNode.Add(new AttackNode
								{
									Node = "A",
									Formation = 4,
									NodeCondition = new ObservableCollection<NodeCondition>
									{
										new NodeCondition
										{
											ShipType = 0
										}
									}
								});
								this.Game.AttackTasks.Add(attackTask4);
							}
						}
					}
					else if (text == "3-1偷弹")
					{
						AttackTask attackTask5 = new AttackTask();
						attackTask5.Name = "3-1偷弹";
						attackTask5.NodeID = 301;
						attackTask5.FleetID = 3;
						attackTask5.Number = 100;
						attackTask5.RepairStrategy = 0;
						attackTask5.AttackNode.Add(new AttackNode
						{
							Node = "A",
							Formation = 0
						});
						attackTask5.AttackNode.Add(new AttackNode
						{
							Node = "C",
							Formation = 0
						});
						this.Game.AttackTasks.Add(attackTask5);
					}
				}
				else if (num != 1783290353u)
				{
					if (num == 2312903235u)
					{
						if (text == "2-5中路")
						{
							AttackTask attackTask6 = new AttackTask();
							attackTask6.Name = "2-5中路";
							attackTask6.NodeID = 205;
							attackTask6.FleetID = 2;
							attackTask6.Number = 1;
							attackTask6.RepairStrategy = 0;
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "A",
								Formation = 0
							});
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "B",
								Formation = 0
							});
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "D",
								Formation = 1
							});
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "H",
								Formation = 1
							});
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "K",
								Formation = 1
							});
							attackTask6.AttackNode.Add(new AttackNode
							{
								Node = "O",
								Formation = 2,
								IsNightWar = true
							});
							this.Game.AttackTasks.Add(attackTask6);
						}
					}
				}
				else if (text == "2-5下路")
				{
					AttackTask attackTask7 = new AttackTask();
					attackTask7.Name = "2-5下路";
					attackTask7.NodeID = 205;
					attackTask7.FleetID = 2;
					attackTask7.Number = 1;
					attackTask7.RepairStrategy = 0;
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "A",
						Formation = 1
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "B",
						Formation = 1
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "E",
						Formation = 1
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "I",
						Formation = 1
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "L",
						Formation = 1,
						IsNightWar = true
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "M",
						Formation = 1,
						IsNightWar = true
					});
					attackTask7.AttackNode.Add(new AttackNode
					{
						Node = "N",
						Formation = 1,
						IsNightWar = true
					});
					this.Game.AttackTasks.Add(attackTask7);
				}
			}
			else if (num <= 2925078149u)
			{
				if (num != 2320424424u)
				{
					if (num != 2877584765u)
					{
						if (num == 2925078149u)
						{
							if (text == "6-3周常")
							{
								AttackTask attackTask8 = new AttackTask();
								attackTask8.Name = "6-3周常";
								attackTask8.NodeID = 603;
								attackTask8.FleetID = 2;
								attackTask8.Number = 1;
								attackTask8.RepairStrategy = 0;
								attackTask8.AttackNode.Add(new AttackNode
								{
									Node = "B",
									Formation = 4
								});
								attackTask8.AttackNode.Add(new AttackNode
								{
									Node = "E",
									Formation = 4
								});
								attackTask8.AttackNode.Add(new AttackNode
								{
									Node = "H",
									Formation = 4
								});
								attackTask8.AttackNode.Add(new AttackNode
								{
									Node = "J",
									Formation = 4,
									IsNightWar = true
								});
								this.Game.AttackTasks.Add(attackTask8);
							}
						}
					}
					else if (text == "捞U47")
					{
						AttackTask attackTask9 = new AttackTask();
						attackTask9.Name = "捞U47";
						attackTask9.NodeID = 601;
						attackTask9.FleetID = 2;
						attackTask9.Number = 50;
						attackTask9.RepairStrategy = 0;
						attackTask9.AttackNode.Add(new AttackNode
						{
							Node = "C",
							Formation = 0
						});
						attackTask9.AttackNode.Add(new AttackNode
						{
							Node = "F",
							Formation = 1
						});
						attackTask9.AttackNode.Add(new AttackNode
						{
							Node = "I",
							Formation = 1,
							IsNightWar = true
						});
						this.Game.AttackTasks.Add(attackTask9);
					}
				}
				else if (text == "2-5上路")
				{
					AttackTask attackTask10 = new AttackTask();
					attackTask10.Name = "2-5上路";
					attackTask10.NodeID = 205;
					attackTask10.FleetID = 2;
					attackTask10.Number = 1;
					attackTask10.RepairStrategy = 0;
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "A",
						Formation = 1
					});
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "B",
						Formation = 1
					});
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "C",
						Formation = 1
					});
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "F",
						Formation = 1
					});
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "G",
						Formation = 1
					});
					attackTask10.AttackNode.Add(new AttackNode
					{
						Node = "J",
						Formation = 1,
						IsNightWar = true
					});
					this.Game.AttackTasks.Add(attackTask10);
				}
			}
			else if (num <= 3470574139u)
			{
				if (num != 3360810055u)
				{
					if (num == 3470574139u)
					{
						if (text == "4-3偷铝")
						{
							AttackTask attackTask11 = new AttackTask();
							attackTask11.Name = "4-3偷铝";
							attackTask11.NodeID = 403;
							attackTask11.FleetID = 3;
							attackTask11.Number = 100;
							attackTask11.RepairStrategy = 0;
							attackTask11.AttackNode.Add(new AttackNode
							{
								Node = "B",
								Formation = 0
							});
							attackTask11.AttackNode.Add(new AttackNode
							{
								Node = "D",
								Formation = 0
							});
							this.Game.AttackTasks.Add(attackTask11);
						}
					}
				}
				else if (text == "5-5六鱼")
				{
					AttackTask attackTask12 = new AttackTask();
					attackTask12.Name = "5-5六鱼";
					attackTask12.NodeID = 505;
					attackTask12.FleetID = 3;
					attackTask12.Number = 50;
					attackTask12.RepairStrategy = 0;
					attackTask12.AttackNode.Add(new AttackNode
					{
						Node = "C",
						Formation = 0
					});
					attackTask12.AttackNode.Add(new AttackNode
					{
						Node = "F",
						Formation = 0
					});
					attackTask12.AttackNode.Add(new AttackNode
					{
						Node = "I",
						Formation = 0
					});
					this.Game.AttackTasks.Add(attackTask12);
				}
			}
			else if (num != 3797228782u)
			{
				if (num == 3836867620u)
				{
					if (text == "自定义任务")
					{
						this.Game.AttackTasks.Add(new AttackTask());
					}
				}
			}
			else if (text == "7-4六鱼")
			{
				AttackTask attackTask13 = new AttackTask();
				attackTask13.Name = "7-4六鱼";
				attackTask13.NodeID = 704;
				attackTask13.FleetID = 2;
				attackTask13.Number = 1;
				attackTask13.RepairStrategy = 0;
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "B",
					Formation = 3,
					NodeCondition = new ObservableCollection<NodeCondition>
					{
						new NodeCondition
						{
							ShipType = 13,
							Number = 1,
							Operator = 2
						}
					}
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "E",
					Formation = 1,
					NodeCondition = new ObservableCollection<NodeCondition>
					{
						new NodeCondition
						{
							ShipType = 9,
							Number = 1
						}
					}
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "D",
					Formation = 1,
					IsSkip = true
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "G",
					Formation = 1
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "L",
					Formation = 1,
					IsSkip = true
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "H",
					Formation = 1
				});
				attackTask13.AttackNode.Add(new AttackNode
				{
					Node = "M",
					Formation = 3,
					IsNightWar = true,
					NodeCondition = new ObservableCollection<NodeCondition>
					{
						new NodeCondition
						{
							ShipType = 13
						}
					}
				});
				this.Game.AttackTasks.Add(attackTask13);
			}
		}
	}
}
